<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script>


		obj = Math;
		
		num = 789.899789;

		res = Math.abs(num);
		res = Math.round(num);
		res = Math.ceil(num);//向上
		res = Math.floor(num);//向上
		res = Math.max(456,5,65,6,5,6,56,56);
		res = Math.min(456,5,65,6,5,6,56,56);

		res = Math.ceil(Math.random()*(11-5)+5)-1;


		// document.write(res)

		// console.log(obj)
		// arr = [];
		// arr[5] = 0;
		// arr[6] = 0;
		// arr[7] = 0;
		// arr[8] = 0;
		// arr[9] = 0;
		// arr[10] = 0;

		// for (var i = 1; i <=100000; i++) {
		// 	res = Math.ceil(Math.random()*(11-5)+5)-1;

		// 	// res = Math.round(Math.random()*(10-5)+5);
		// 	arr[res]++;
		// }

		// console.log(arr);

		// 1-47  7 不重复数
		
		arr = [];

		for (var i = 0; i <7; i++) {
			is = true;
			y = Math.ceil(Math.random()*(48-1)+1)-1;

			for(var j in arr){
				if(arr[j]==y){
					is = false;
					i--;
				}
			}
			if(is){
				arr.push(y);
			}
		}

		document.write(arr);


	</script>
</head>
<body>
	
</body>
</html>